package com.example.springcloud.rocketmq.controller;

import com.example.springcloud.rocketmq.service.ReceiveService;
import com.example.springcloud.rocketmq.service.SendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * <pre>
 *      MQController
 * </pre>
 *
 * <pre>
 * @author mazq
 * 修改记录
 *    修改后版本:     修改人：  修改日期: 2021/03/16 15:45  修改内容:
 * </pre>
 */
@RestController
public class MQController {

    @Autowired
    SendService sendService;
    @Autowired
    ReceiveService receiveService;

    @GetMapping(value = {"/sendMsg/{msg}"})
    public String sendMsg(@PathVariable("msg")String msg) {
        sendService.send(msg , "strTag");
        return String.format("message[%s] send success" , msg);
    }


}
